/*
 * RingBuffer.h
 *
 *  Created on: 10-nov-2012
 *      Author: dna
 */

#ifndef RINGBUFFER_H_
#define RINGBUFFER_H_

template <class T> class RingBuffer {

private:
	T *ptr;
	unsigned long size;
	unsigned long put_i;
	unsigned long get_i;

public:
	RingBuffer(unsigned long size);
	virtual ~RingBuffer();

	void put(T element);

	T get(void);

	void flush(void);
};

#endif /* RINGBUFFER_H_ */
